<!doctype html>
[#escape x as (x)!?html]
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>${channel.seoTitle!channel.name} - ${site.seoTitle} - Powered by JPROCMS</title>
  <meta name="keywords" content="${channel.seoKeywords!site.seoKey}">
  <meta name="description" content="${channel.seoDescription!site.seoDesc}">
  [#include '../includes/common_res.html'/]
</head>
<body>
[#if config.grade>1&&!dynamic]
  <!--# include file="/${site.sitePathPrefix}/includes/header.html" -->
[#else]
  [#include '../includes/header.html'/]
[/#if]
<div class="bg-gray-200">
  <div class="container">
    <nav class="row" aria-label="breadcrumb">
      <ol class="col list-inline my-2">
        [#assign parent = channel.parent!channel/]
        <li class="list-inline-item"><a class="btn btn-sm [#if parent.id == channel.id]btn-primary[#else]btn-link[/#if]" href="${parent.url}">全部</a></li>
        [@ZChannelList parentId=parent.id; list]
          [#list list as c]
            <li class="list-inline-item"><a class="btn btn-sm [#if channel.id == c.id]btn-primary[#else]btn-link[/#if]" href="${c.url}">${c.name}</a></li>
          [/#list]
        [/@ZChannelList]
      </ol>
    </nav>
  </div>
</div>
<div class="container mt-3">
  <div class="row">
    <div class="col">
      <div>
        [#assign customsQueryMap={}/]
        [#list channel.contentModel.fieldList?filter(field->['radio','checkbox','select','multipleSelect']?seqContains(field.type)) as field]
          <div class="py-1 border-bottom">
            [#assign param=field.code+'_cus'/]
            <a href="${ZParamsJoin(channel.url, channel.dynamicUrl, param)}" class="btn btn-sm[#if !Params[param]??] btn-secondary[#else] btn-link text-reset[/#if]">全部${field.name}</a>
            [@DictList typeId=field.dictTypeId; list]
              [#list list as dict]
                <a href="${ZParamsJoin(channel.url, channel.dynamicUrl, param,dict.value)}"
                   class="btn btn-sm [#if Params[param]! == dict.value]btn-secondary[#else]btn-link text-reset[/#if]">${dict.label}</a>
              [/#list]
            [/@DictList]
          </div>
          [#assign customsQueryMap=customsQueryMap + {'EQ_'+param: Params[param]!}/]
        [/#list]
      </div>
      [@ZContentPage channelId=channel.id includeChildChannel='true' customs=customsQueryMap orderBy="top_level_desc,release_time_desc"; pageResult]
        <ul class="list-unstyled">
          [#list pageResult.list as content]
            <li class="mt-3 media border-bottom position-relative pb-3">
              [#if content.sysImage??][@ZUrl object=content class="mr-3"]<img src="${content.sysImage}" class="rounded-sm img-thumbnail common-media-img" alt="${content.title}">[/@ZUrl][/#if]
              <div class="media-body">
                <p class="mt-0 mb-1">[@ZUrl object=content class="common-link text-decoration-none"/]</p>
                <p class="text-muted d-none d-sm-block mb-2">
                  [@ZUrl object=content class="text-reset small text-decoration-none"]${ZSubstring(content.description,60,'...')}[/@ZUrl]
                </p>
                <div class="small text-muted mt-3 clearfix">
                  <div class="float-left">
                    <span>[#list content.channel.nodeList as c][@ZUrl object=c/][#if c_has_next] > [/#if][/#list]</span>
                    <i class="ml-2 far fa-eye"></i> ${content.views}
                  </div>
                  <div class="float-right"><i class="ml-2 far fa-clock"></i> ${ZFormat(content.releaseTime, 'yyyy-MM-dd')}</div>
                </div>
              </div>
            </li>
          [/#list]
        </ul>
        [#include '../includes/inc_page.html'/]
      [/@ZContentPage]
    </div>
  </div>
</div>
[#if config.grade>1&&!dynamic]
    <!--# include file="/${site.sitePathPrefix}/includes/footer.html" -->
[#else]
    [#include '../includes/footer.html'/]
[/#if]
<script>axios.get('${api}/channel/view/${channel.id?c}');</script>
</body>
</html>
[/#escape]
